@extends('Admin.layout.layout')
@section('title','用户修改')
@section('weizhi','用户修改')
@section('con')
<!-- {{session('error')}} -->
    @if(session('error'))
        <div class="alert alert-danger">
            {{session('error')}}
        </div>
    @endif

    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

<div class="row">
    <div class="col-lg-6 col-lg-offset-2">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-12">
                        <form role="form" action="{{url('/admin/user/update')}}" method="post">
                            <div class="form-group">
                                <label>用户名</label>
                                <input class="form-control" type="text" name="username" value="{{$userinfo->username}}">
                            </div>
                            <div class="form-group">
                                <label>邮箱</label>
                                <input class="form-control" type="text" name="useremail" value="{{$userinfo->useremail}}">
                            </div>
                            <div class="form-group">
                                <label>手机号</label>
                                <input class="form-control" type="text" name="userphone" value="{{$userinfo->userphone}}">
                            </div>
                            <input type="hidden" name="id" value="{{$userinfo->id}}">
                            {{csrf_field()}}
                            <button class="btn btn-primary btn-lg btn-block">修改</button>
                        </form>
                    </div>
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>

@endsection